/*****************************************************************************
 * $LastChangedDate: 2009-11-07 22:56:33 -0500 (Sat, 07 Nov 2009) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Singleton for keyboard device.
 * @remarks device_keyboard and device_mouse are identical.
 *//*
 * LEGAL:   COPYRIGHT (C) 2009 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#define INPUT_DEVICE_KEYBOARD_CC 1
#include "base/module.hh"
using namespace base;
#include "input/module.hh"
#include "input/device_keyboard.hh"

namespace input {

////////////////////////////////////////////////////////////////////////////////
////////////////////////////  KeyboardDevice  //////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

KeyboardDevice* KeyboardDevice::msInstance;  // will be a derivative

/*****************************************************************************
 * ctor/dtor.
 *****************************************************************************/
KeyboardDevice::KeyboardDevice( void )
{
ASSERT_RUN_ONCE;
    // NOP
}

KeyboardDevice::~KeyboardDevice()
{
    // NOP
}

/*****************************************************************************
 * This is a special kind of singleton that instantiates a system-specific derivative of itself.
 *****************************************************************************/
KeyboardDevice&
KeyboardDevice::GetInstance( void )
{
    if ( UX( msInstance == NULL ) )
        msInstance = new INPUT_DEVICE_KEYBOARD_CLASS;  // system-specific derivative
    return *msInstance;
}        

} // namespace input
